package com.liuym.admin.service.impl;

import com.liuym.admin.repository.mapper.TableNameMapper;
import com.liuym.admin.repository.model.entity.TableNameEntity;
import com.liuym.admin.service.TableNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Liuym
 * @date 2018/12/29 15:48
 * @describe：
 */
@Service
public class TableNameServiceImpl implements TableNameService {

    @Autowired
    private TableNameMapper tableNameMapper;

    @Override
    public TableNameEntity findByTableAndTime(String tableName) {
        return tableNameMapper.findByTableAndTime(tableName);
    }

    @Override
    public List<TableNameEntity> findAll() {
        return tableNameMapper.findAll();
    }

    @Override
    public int insert(TableNameEntity tableName) {
        return tableNameMapper.insert(tableName);
    }
}
